package com.zzyl.dto;

import com.zzyl.base.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;

@Data
public class NursingPlanDto extends BaseDto {

    @ApiModelProperty(value = "排序编号", example = "1")
    private Integer sortNo;

    @ApiModelProperty(value = "计划名称", required = true, example = "日常护理计划")
    @NotBlank(message = "计划名称不能为空")
    private String planName;

    @ApiModelProperty(value = "状态：0-禁用 1-启用", example = "1")
    private Integer status;

    // 关键修正：使用集合而非单个对象
    @Valid
    private List<NursingProjectPlanDto> projectPlans = new ArrayList<>(); // Dto中的数据来自前端，因此其字段必须和前端保持一致，才能够接收前端数据
}
